import { AppBaseEntity } from 'src/shared/database/baseEntity';
import { Column, Entity } from 'typeorm';

@Entity({
  name: 'product_skus',
  comment: '商品SKU表',
})
export class ProductSku extends AppBaseEntity {
  @Column({
    comment: '商品id',
    name: 'product_id',
  })
  productId: number;

  // 价格
  @Column({
    comment: '价格',
    name: 'price',
    type: 'decimal',
    precision: 10,
    scale: 2,
  })
  price: number;

  // 库存
  @Column({
    comment: '库存',
    name: 'stock',
  })
  stock: number;

  // sku编码
  @Column({
    comment: 'sku编码',
    name: 'sku_code',
    default: '',
  })
  skuCode: string;
}
